package com.atguigu.jxc.controller;

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.OverflowList;
import com.atguigu.jxc.service.OverflowListGoodsService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/overflowListGoods")
public class OverflowListGoodsController {
    @Resource
    private OverflowListGoodsService overflowListGoodsService;
    //新增报溢单
    @PostMapping("/save")
    public ServiceVO saveOverflowListGoods(OverflowList overflowList, String overflowListGoodsStr){
        return overflowListGoodsService.saveOverflowListGoods(overflowList, overflowListGoodsStr);
    }
    //报溢单查询
    @PostMapping("/list")
    public Map<String, Object> getList(String sTime, String eTime){
        return overflowListGoodsService.getList(sTime, eTime);

    }
    //报表单商品信息
    @PostMapping("/goodsList")
    public Map<String, Object> getGoodsList(Integer overflowListId){

        return overflowListGoodsService.getGoodsList(overflowListId);
    }


}
